let uu = document.querySelector("#info2")
// console.log(uu);
let uu1 = document.querySelector("#click")
let mores = document.querySelectorAll(".more1")
// Array.from(mores)
// for (let i = 0; i <= Array.from(mores).length; i++) {
//     Array.from(mores)[i].setAttribute('style', 'display:block');
// }
// console.log([...uu2]);
// console.log(uu1);
fetch("http://chst.vip:1234/api/getmoneyctrl")
    .then(body => body.json())
    .then(res => {
        let html = ""
        res.result.forEach(item => {
            html += `
        <li>
        <a href="./discount.html?productid=${item.productId}" productId="${item.productId}" class="clearfix">
            <div class="img fl">
                ${item.productImg2}
            </div>
            <div class="infoR">
                <div class="title">
                    <h4>${item.productName}</h4>
                </div>
                <div class="other">
                    <span class="mall fl">${item.productFrom} | ${item.productTime}</span>
                    <i class="iconfont icon-xiaoxi fr">${item.productComCount}</i>
                </div>
            </div>
        </a>
        </li>
        `;
        })
        uu.innerHTML = html
    })
// console.log(Array.from(mores));
var flag = true
// console.log(Array.from(mores);
uu1.onclick = function () {
    if (flag) {
        flag = false
        mores.forEach(item => {
            item.style.display = "block"
        })
    } else {
        flag = true
        mores.forEach(item => {
            item.style.display = "none"
        })
    }
}
